package homework.apiday06.exception2;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseableDemo {
    public static void main(String[] args) {
        try ( FileOutputStream fos = new FileOutputStream("lll.dat");){
           fos.write(1);
        } catch (IOException e) {
            System.out.println("出错处理了");
        }//无需给些finally块
    }
}
